{% extends 'common/base_admin.html' %}

{% load static %}

{% block content-title %}
个人设置
{% if error_info %}
    <span style="color: red;">{{ error_info }}</span>
    {% elif success_info %}
    <span style="color: green;">{{ success_info }}</span>
{% endif %}
{% endblock %}

{% block content %}
  {% if teacher_form %}
    <div class="layui-card-header" style="font-weight: bold;">
        教师信息设置
    </div>
    <div class="layui-card-body">
        <div class="layui-btn-container">
            <form class="layui-form" id="teacher_info" action="{% url 'manage:settings' %}" method="post">
                {% csrf_token %}
                {{ teacher_form.as_p }}
                <button type="submit" class="layui-btn layui-btn-fluid" style="margin-top: 10px;">提交修改</button>
            </form>
        </div>
    </div>
  {% elif student_form %}
    <div class="layui-card-header" style="font-weight: bold;">
        学生信息设置
    </div>
    <div class="layui-card-body">
        <div class="layui-btn-container">
            <form class="layui-form" id="student_info" action="{% url 'manage:settings' %}" method="post">
                {% csrf_token %}
                {{ student_form.as_p }}
                <button type="submit" class="layui-btn layui-btn-fluid" style="margin-top: 10px;">提交修改</button>
            </form>
        </div>
    </div>
  {% else %}
    <div class="layui-card-body">
        {{ error_info }}
        {{ success_info }}
    </div>
  {% endif %}
{% endblock %}

</div>